'''
Created on Jul 21, 2009

@author: user
'''
import graph.graph
import cliques.mdp.edgeProbModel
import cliques.utils
class realEdgeProb(cliques.mdp.edgeProbModel):
    '''
    classdocs
    '''
    def __init__(self):
        '''
        Constructor
        '''
        cliques.mdp.edgeProbModel.edgeProbModel.__init__(self)
        self.real_graph = graph.graph()

    def pr(self, node, neighbors, all_possible_neighbors):
        ''' Probability of nodes '''
        real_neighbors = self.real_graph.neighbors(node)
        if cliques.utils.list_set_equals(real_neighbors,neighbors):
            return 1
        else:
            return 0